---
layout: default
---

<!-- Post Header -->
<style type="text/css">
    header.intro-header{
        background-image: url('{{ site.BASE_PATH }}{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}')
    }
</style>
<header class="intro-header" >
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                <div class="post-heading">
                    <h1>{{ page.title }}</h1>
                    {% comment %}
                        always create a h2 for keeping the margin , Hux
                    {% endcomment %}
                    {% comment %} if page.subtitle {% endcomment %}
                    <h2 class="subheading">{{ page.subtitle }}</h2>
                    {% comment %} endif {% endcomment %}
                    <span class="meta">Posted by {% if page.author %}{{ page.author }}{% else %}{{ site.title }}{% endif %} on {{ page.date | date: "%B %-d, %Y" }}</span>
                </div>
            </div>
        </div>
    </div>
</header>

<article>
<!-- Main Content -->
	<div class="container">
		<div class="row">

		<!-- Post Container -->
    		<div class="
                col-lg-8 col-lg-offset-2
                col-md-10 col-md-offset-1
                post-container">

    			{{ content }}

				<p class="text-right">
				<a href="/"> {% if page.author %}{{ page.author }}{% else %}{{ site.author }}{% endif %}</a>
				<span class="time">
				/
				<time>{{ page.date | date:"%Y-%m-%d" }}</time>
				<style>span.test {color: #0085A5;font-weight: bold;}</style>
				</span>/&nbsp;<span data-hk-page="current" class="test"> - </span>&nbsp;views
				<br>
				<span>
					<strong><em>Published under<a href="http://creativecommons.org/licenses/by-nc-sa/3.0/cn/">(CC) BY-NC-SA 3.0 CN</a>.
					</em></strong>
				</span>



				</p>

					<hr>
					{% unless page.categories == empty %}
					<ul class="tag_box list-unstyled list-inline">
					<li><i class="fa fa-folder-open"></i></li>
					{% assign categories_list = page.categories %}
					{% if categories_list.first[0] == null %}
						{% for category in categories_list %}
							<li><a href="{{ site.BASE_PATH }}/{{ site.categories_path }}#{{ category }}-ref">
								{{ category | join: "/" }} <span>({{ site.categories[category].size }})</span>
								{% unless forloop.last %},{% endunless %}
							</a></li>
						{% endfor %}
					{% else %}
						{% for category in categories_list %}
							<li><a href="{{ site.BASE_PATH }}/{{ site.categories_path }}#{{ category[0] }}-ref">
								{{ category[0] | join: "/" }} <span>/{{ category[1].size }})</span>
							</a></li>
						{% endfor %}
					{% endif %}
					</ul>
					{% endunless %}

					{% unless page.tags == empty %}
					<ul class="list-inline">
					<li><i class="fa fa-tags"></i></li>
					{% assign tags_list = page.tags %}
					{% if tags_list.first[0] == null %}
						{% for tag in tags_list %}
							<li>
								<a href="{{ site.BASE_PATH }}/{{ site.tags_path }}#{{ tag }}-ref">
								{{ tag }} <span>({{ site.tags[tag].size }})</span>
								{% unless forloop.last %},{% endunless %}
								</a>
							</li>
						{% endfor %}
					{% else %}
						{% for tag in tags_list %}
							<li>
								<a href="{{ site.BASE_PATH }}/{{ site.tags_path }}#{{ tag[0] }}-ref">
									{{ tag[0] }} <span>({{ tag[1].size }})</span>
									{% unless forloop.last %},{% endunless %}
								</a>
							</li>

						{% endfor %}
					{% endif %}
					{% assign tags_list = nil %}
					</ul>
					{% endunless %}

					<hr>

			{% if site.duoshuo_share && site.duoshuo_username %}
                <!-- 多说 Share start -->
				<div class="ds-share"
                    style="text-align: right"
                    data-thread-key="{{page.id}}"
                    data-title="{{page.title}}"
                    data-url="{{site.url}}{{site.BASE_PATH}}{{page.url}}"
                    data-images="{{site.url}}{{site.BASE_PATH}}{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}"
                    data-content="| {{ page.description }} | {{ site.SEOTitle }}." >
                    <div class="ds-share-inline">
                      <ul  class="ds-share-icons-16">
                        <li data-toggle="ds-share-icons-more"><a class="ds-more" href="#">分享到：</a></li>
                        <li><a class="ds-wechat flat" href="javascript:void(0);" data-service="wechat">微信</a></li>
                        <li><a class="ds-weibo flat" href="javascript:void(0);" data-service="weibo">微博</a></li>
                        <li><a class="ds-douban flat" href="javascript:void(0);" data-service="douban">豆瓣</a></li>
                      </ul>
                      <div class="ds-share-icons-more">
                      </div>
                    </div>
                <hr>
                </div>
                <!-- 多说 Share end-->
                {% endif %}


                <ul class="pager">

					{% if page.previous %}
					<li class="previous"><a href="{{ site.BASE_PATH }}{{ page.previous.url }}" data-toggle="tooltip" data-placement="top" title="{{ page.previous.title }}">&larr; Previous</a></li>
					{% else %}
					<li class="previous disabled"><a>&larr; Previous</a></li>
					{% endif %}
					{% if page.next %}
					<li class="next"><a href="{{ site.BASE_PATH }}{{ page.next.url }}" data-toggle="tooltip" data-placement="top" title="{{ page.next.title }}">Next &rarr;</a></li>
					{% else %}
						<li class="next disabled"><a>Next &rarr;</a>
					{% endif %}

                </ul>


                {% if site.duoshuo_username %}
                <!-- 多说评论框 start -->
                <div class="comment">
                    <div class="ds-thread"
                        data-thread-key="{{page.id}}"
                        data-title="{{page.title}}"
                        data-url="{{site.url}}{{site.BASE_PATH}}{{page.url}}" >
                    </div>
					<!-- 多说热评文章 end -->
					<div class="ds-top-threads" data-range="monthly" data-num-items="5"></div>
                </div>
                <!-- 多说评论框 end -->
                {% endif %}

                {% if site.disqus %}
                <!-- disqus 评论框 start -->
                <div class="comment">
                    <div id="disqus_thread" class="disqus-thread"></div>
                </div>
                <!-- disqus 评论框 end -->
                {% endif %}

            </div>
    </div>
		<!-- Sidebar Container -->
            <div class="
                col-lg-8 col-lg-offset-2
                col-md-10 col-md-offset-1
                sidebar-container">


                <!-- Friends Blog -->
                {% if site.friends %}
                <hr>
                <h5>友情链接</h5>
                <ul class="list-inline">
                    {% for friend in site.friends %}
                        <li><a href="{{friend.href}}">{{friend.title}}</a></li>
                    {% endfor %}
                </ul>
                {% endif %}
            </div>
        </div>
    </div>
</article>

{% if site.duoshuo_username %}
<!-- 多说公共JS代码 start (一个网页只需插入一次) -->
<script type="text/javascript">

    var _user = '{{site.duoshuo_username}}';
    // duoshuo comment query.
    var duoshuoQuery = {short_name: _user };
    (function() {
        var ds = document.createElement('script');
        ds.type = 'text/javascript';ds.async = true;
        ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
        ds.charset = 'UTF-8';
        (document.getElementsByTagName('head')[0]
         || document.getElementsByTagName('body')[0]).appendChild(ds);
    })();
</script>
<!-- 多说公共JS代码 end -->
{% endif %}

{% if site.disqus %}
<!-- disqus 公共JS代码 start (一个网页只需插入一次) -->
<script type="text/javascript">
    /* * * CONFIGURATION VARIABLES * * */
    var disqus_shortname = "{{site.disqus}}";
    var disqus_identifier = "{{page.id}}";
    var disqus_url = "{{site.BASE_PATH}}{{page.url}}";
    (function() {
        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
        dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
</script>
<!-- disqus 公共JS代码 end -->
{% endif %}

{% if site.anchorjs %}
<!-- async load function -->
<script>
    function async(u, c) {
      var d = document, t = 'script',
          o = d.createElement(t),
          s = d.getElementsByTagName(t)[0];
      o.src = u;
      if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
      s.parentNode.insertBefore(o, s);
    }
</script>
<!-- anchor-js, Doc:http://bryanbraun.github.io/anchorjs/ -->
<script>
    async("//cdn.bootcss.com/anchor-js/1.1.1/anchor.min.js",function(){
        anchors.options.placement = 'left';
        anchors.add('h2,h3');
		anchors.remove('.subheading');
    })
</script>
{% endif %}

{% if page.mathjax %}
<!-- mathjax -->
<script>
  (function () {
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.src  = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
    document.getElementsByTagName("head")[0].appendChild(script);
  })();
</script>
{% endif %}

<!-- for R highlight -->
<!--script type="text/javascript" src="{{ site.BASE_PATH }}/assets/js/r-highlight.js"></script-->

<!--page views-->
<script src="https://cdn1.lncld.net/static/js/av-mini-0.6.10.js"></script>
<script src="http://jerry-cdn.b0.upaiyun.com/hit-kounter/hit-kounter-lc-0.2.0.js"></script>
